package com.kaishengit.pojo;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name="t_product")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class Product {
	
	private int id;
	private String name;
	
	private Set<ProductEmployee> productEmployeeSet;
	private Set<Message> messageSet;
	
	private Set<Contact> contactSet;
	private Set<Company> companySet;
	private Set<Chance> chanceSet;
	private Set<Event> eventSet;
	private Set<Task> taskSet;
	
	
	
	
	
	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}

	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@OneToMany(mappedBy="product")
	public Set<Contact> getContactSet() {
		return contactSet;
	}
	public void setContactSet(Set<Contact> contactSet) {
		this.contactSet = contactSet;
	}
	@OneToMany(mappedBy="product")
	public Set<Company> getCompanySet() {
		return companySet;
	}
	public void setCompanySet(Set<Company> companySet) {
		this.companySet = companySet;
	}
	@OneToMany(mappedBy="product")
	public Set<Chance> getChanceSet() {
		return chanceSet;
	}
	public void setChanceSet(Set<Chance> chanceSet) {
		this.chanceSet = chanceSet;
	}
	@OneToMany(mappedBy="product")
	public Set<Event> getEventSet() {
		return eventSet;
	}
	public void setEventSet(Set<Event> eventSet) {
		this.eventSet = eventSet;
	}
	@OneToMany(mappedBy="product")
	public Set<Task> getTaskSet() {
		return taskSet;
	}
	public void setTaskSet(Set<Task> taskSet) {
		this.taskSet = taskSet;
	}
	//-get set--
	
	
	@OneToMany(mappedBy="product")
	public Set<Message> getMessageSet() {
		return messageSet;
	}
		public void setMessageSet(Set<Message> messageSet) {
		this.messageSet = messageSet;
	}
	
	@OneToMany(mappedBy="product")
	public Set<ProductEmployee> getProductEmployeeSet() {
		return productEmployeeSet;
	}
	public void setProductEmployeeSet(Set<ProductEmployee> productEmployeeSet) {
		this.productEmployeeSet = productEmployeeSet;
	}
	
	
}
